package com.company.singletonExample;

/**
 * Created by yijy on 2017/6/13.
 * Java单例：懒汉——不安全 写法
 *  致命的是在多线程不能正常工作
 */
public class SingletonLanHanModel {

    private static SingletonLanHanModel singletonLanHanModel;

    private SingletonLanHanModel(){

    }

    private static SingletonLanHanModel getInstance(){
        if(singletonLanHanModel==null){
            singletonLanHanModel = new SingletonLanHanModel();
        }
        return singletonLanHanModel;
    }

}
